<?php
/**
* @version 0.1
* @package dok
* @copyright Derek OKeeffe and Alinea Interactive
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* 
* Used to integrate Joomla with Knowledgetree. 
* 
*/

require_once "HTTP/Request.php";

$req =& new HTTP_Request("http://dashboard.elektomi.net/joomla/kt_sso.php"); 

echo '<br>Sending cookies to kt_sso.php and check if it returns a user name<br>';
echo '---------- output below from kt_sso.php ---------------<br>';

foreach ($_COOKIE as $cookie) {
	$req->addQueryString('cookie',$cookie);
	$req->sendRequest();
	$user = $req->getResponseBody();
	if ($user) {
		echo $user;
		break;
	}
}

?>
